package spring6.iocxml.lifecycle;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUser {
    @Test
    public void TestUser(){
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("bean-life.xml");
        User user = context.getBean(User.class);
        System.out.println("6 bean对象创建完成");
        System.out.println(user);
//        销毁
        context.close();
    }
}
